<template>
  <div class="md-layout-item md-small-size-100" :class="classObject">
    <md-field>
      <label :style="edittype=='S'?'top:0px;':''">{{title}}：</label>
      <select v-model="datacolumn" style="width:100%;" v-if="edittype=='S'">
        <option v-for="option in sellist" v-bind:value="option.itemvalue" v-bind:key="option.itemvalue">
          {{ option.itemcontent }}
        </option>
      </select>
      <md-input v-model="datacolumn" v-else-if="edittype=='T'"></md-input>
      <md-input v-bind:value="datacolumn" v-else></md-input>
    </md-field>
  </div>
</template>
<script>
export default {
  props: {
    title: '',
    datacolumn: '',
    sellist: undefined,
    mergelen: undefined,
    edittype: undefined
  },
  computed: {
    classObject: function () {
      // console.log(this.mergeleng)
      if (this.mergelen === undefined) {
        return 'md-size-20'
      } else {
        return 'md-size-' + (20 * parseInt(this.mergelen)).toString()
      }
    }
  }
}
</script>
